package com.net.xpay.alipay.exception;

/**
 * 2020/4/25 11:55

 */
public class AlipayClientException extends RuntimeException {
    private String code;

    private String msg;

    private String subCode;

    private String subMsg;

    public AlipayClientException() {
        this("", "", "", "");
    }

    public AlipayClientException(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public AlipayClientException(String code, String msg, String subCode, String subMsg) {
        this.code = code;
        this.msg = msg;
        this.subCode = subCode;
        this.subMsg = subMsg;
    }

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public String getSubCode() {
        return subCode;
    }

    public String getSubMsg() {
        return subMsg;
    }

    @Override
    public String toString() {
        return "|AlipayClientException|code=" + code + "|msg=" + msg + "|subCode=" + subCode + "|subMsg" + subMsg;
    }

    @Override
    public String getMessage() {
        return "|AlipayClientException|code=" + code + "|msg=" + msg + "|subCode=" + subCode + "|subMsg" + subMsg;
    }
}
